<template>
	<view class="illnessPopup-wrap" v-if="inquiry">
		<view class="illnessPopup-box" v-if="type == 'syndromeTongueList'">
			<u-title :value="data.tongueName"></u-title>
			<view class="illnessPopup-box-txt">典型舌像图片，仅供参考</view>
			<image :src="data.pictureUrl" mode="aspectFill"></image>
		</view>

		<view class="illnessPopup-box" v-if="type == 'syndromePcmList'">
			<view class="illnessPopup-box-title">中成药：{{ data.pcmName }}</view>

			<u-title value="成分"></u-title>
			<view class="illnessPopup-box-txt">{{ data.composition }}</view>
			<u-title value="功效"></u-title>
			<view class="illnessPopup-box-txt">{{ data.efficacy }}</view>

			<u-title value="方解"></u-title>
			<view class="illnessPopup-box-txt">{{ data.theSolution }}</view>

			<u-title value="制法"></u-title>
			<view class="illnessPopup-box-txt">{{ data.making }}</view>

			<u-title value="适宜人群"></u-title>
			<view class="illnessPopup-box-txt">{{ data.appropriateCrowd }}</view>

			<u-title value="禁忌"></u-title>
			<view class="illnessPopup-box-txt">{{ data.taboo }}</view>

			<u-title value="注意事项"></u-title>
			<view class="illnessPopup-box-txt">{{ data.needingAttention }}</view>
		</view>

		<view class="illnessPopup-box" v-if="type == 'syndromeFoodList'">
			<view class="illnessPopup-box-title">食疗方：{{ data.foodName }}</view>
			<u-title value="原料"></u-title>
			<view class="illnessPopup-box-txt">{{ data.rawMaterial }}</view>
			<u-title value="做法"></u-title>
			<view class="illnessPopup-box-txt">{{ data.practice }}</view>
			<u-title value="功效" v-if="data.efficacy"></u-title>
			<view class="illnessPopup-box-txt" v-if="data.efficacy">{{ data.efficacy }}</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			data: '',
			type: ''
		};
	},
	onLoad(option) {
		this.data = JSON.parse(option.data);
		this.type = option.type;
		console.log(this.data);
		console.log(this.type);
	},
	onShow() {},
	methods: {}
};
</script>

<style lang="less">
.illnessPopup-wrap {
	.illnessPopup-box {
		width: 690rpx;
		background-color: #fff;
		margin: 24rpx 30rpx;
		padding: 32rpx;
		box-sizing: border-box;
		.illnessPopup-box-title {
			font-size: 36rpx;
			font-weight: bold;
			margin-bottom: 24rpx;
		}
		.illnessPopup-box-txt {
			margin: 12rpx 0 24rpx;
		}
	}
}
</style>
